import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'app.dart';
import 'dart:io';

void main() {

  WidgetsFlutterBinding.ensureInitialized(); /// 新版本 手动加入绑定

  // 强制竖屏
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown
  ]);

  runApp(MyApp());
  // 设置沉浸式状态栏
  if (Platform.isAndroid) {

    SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }

} 